local addonName,ns = ...
local L = ns.L
local DB = ns.PlateColorDB
local SetLoaded--设置加载一次
ns.event("PLAYER_ENTERING_WORLD", function()
if SetLoaded then return end
SetLoaded = true
--分页3滚动框架
local ConFramescrollFrame3 = CreateFrame("ScrollFrame", nil, ns.tabframe3, "UIPanelScrollFrameTemplate")
ConFramescrollFrame3:SetPoint("TOPLEFT", ns.tabframe3, "TOPLEFT", 4, -5)
ConFramescrollFrame3:SetPoint("BOTTOMRIGHT", ns.tabframe3, "BOTTOMRIGHT", -30, 5)
--分页3滚动内容
local ConFrame3 = CreateFrame("Frame", nil, ConFramescrollFrame3)
ConFrame3:SetSize(670,480)
ConFramescrollFrame3:SetScrollChild(ConFrame3)
ns.Y[3] = 0	--设置起始位置

local auraleft = ns.AddSetTiText(ConFrame3,3,L["光环设置"])
local hpRightAura = ns.AddSetClickB(ConFrame3,3,L["血条右侧光环"],L["血条右侧光环鼠标提示"],"hpRightAura")
local RightAuraTip = ns.AddSetClickB(ConFrame3,3,L["右侧光环鼠标提示"],L["右侧光环鼠标提示鼠标提示"],"RightAuraTip")
local hpAuraToLeft = ns.AddSetClickB(ConFrame3,3,L["右侧光环放置在左侧"],L["右侧光环放置在左侧鼠标提示"],"hpAuraToLeft")
local hideAura = ns.AddSetClickB(ConFrame3,3,L["禁用光环"],L["禁用光环鼠标提示"],"hideAura")
local auraCooldownText = ns.AddSetClickB(ConFrame3,3,L["光环冷却文字"],L["光环冷却文字鼠标提示"],"auraCooldownText")
local auraToolTip = ns.AddSetClickB(ConFrame3,3,L["光环鼠标提示"],L["光环鼠标提示鼠标提示"],"auraToolTip")
local auraSquare = ns.AddSetClickB(ConFrame3,3,L["正方形光环"],L["正方形光环鼠标提示"],"auraSquare")
local auraScale = ns.AddSetSlider(ConFrame3,3,L["光环大小"],L["光环大小鼠标提示"],5,45,1,"%d","auraScale")
local auraOffsetY = ns.AddSetSlider(ConFrame3,3,L["光环上下偏移"],L["光环上下偏移鼠标提示"],-50,50,1,"%d","auraOffsetY")
local selfHpAura = ns.AddSetClickB(ConFrame3,3,L["个人资源光环"],L["个人资源光环鼠标提示"],"selfHpAura")
local selfAuraScale = ns.AddSetSlider(ConFrame3,3,L["个人资源光环大小"],L["个人资源光环大小鼠标提示"],0.5,1.5,0.1,"%.1f","selfAuraScale")

local function hideAuraSet()
	if PlateColorDB.hideAura then
		auraCooldownText.check:Disable()
		auraCooldownText.text:SetTextColor(0.5, 0.5, 0.5)
		auraToolTip.check:Disable()
		auraToolTip.text:SetTextColor(0.5, 0.5, 0.5)
		auraSquare.check:Disable()
		auraSquare.text:SetTextColor(0.5, 0.5, 0.5)
		auraScale.check:Disable()
		auraScale.text:SetTextColor(0.5, 0.5, 0.5)
		auraScale.righttext:SetTextColor(0.5, 0.5, 0.5)
		auraOffsetY.check:Disable()
		auraOffsetY.text:SetTextColor(0.5, 0.5, 0.5)
		auraOffsetY.righttext:SetTextColor(0.5, 0.5, 0.5)
		selfHpAura.check:Disable()
		selfHpAura.text:SetTextColor(0.5, 0.5, 0.5)
		selfAuraScale.check:Disable()
		selfAuraScale.text:SetTextColor(0.5, 0.5, 0.5)
		selfAuraScale.righttext:SetTextColor(0.5, 0.5, 0.5)
	else
		auraCooldownText.check:Enable()
		auraCooldownText.text:SetTextColor(1,.82,0)
		auraToolTip.check:Enable()
		auraToolTip.text:SetTextColor(1,.82,0)
		auraSquare.check:Enable()
		auraSquare.text:SetTextColor(1,.82,0)
		auraScale.check:Enable()
		auraScale.text:SetTextColor(1,.82,0)
		auraScale.righttext:SetTextColor(0,1,0)
		auraOffsetY.check:Enable()
		auraOffsetY.text:SetTextColor(1,.82,0)
		auraOffsetY.righttext:SetTextColor(0,1,0)
		selfHpAura.check:Enable()
		selfHpAura.text:SetTextColor(1,.82,0)
		selfAuraScale.check:Enable()
		selfAuraScale.text:SetTextColor(1,.82,0)
		selfAuraScale.righttext:SetTextColor(0,1,0)
	end
end
hideAuraSet()
hideAura.check:HookScript("OnClick", function ()
	hideAuraSet()
end)

end)